package com.xinqi.modules.prepare.prepare.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.annotations.Describe;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 备课区操作类型
 * <p>
 * 操作子类型：ADD-添加了；EDIT-编辑了；CHANGE-变更了；DEL-删除了
 * </p>
 *
 * @author linkai
 * @date 2023/03/19
 */
@Describe("备课区操作子类型")
public enum PrepareSubOperateTypeEnum implements BaseEnum {

    ADD("ADD", "添加了"),
    EDIT("EDIT", "编辑了"),
    CHANGE("CHANGE", "变更了"),
    REMOVE("REMOVE", "移除了"),
    QUIT("QUIT", "退出了"),
    DEL("DEL", "删除了"),
    ;

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    PrepareSubOperateTypeEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static PrepareSubOperateTypeEnum of(String code) {
        return BaseEnum.of(PrepareSubOperateTypeEnum.class, code);
    }

}
